import dayjs from 'dayjs'
import * as index from '~/utils/index'
import * as url from '~/utils/url'

export const utils = {
  // 将ISO 8601字符串或者unix毫秒时间戳渲染为当地时间
  renderDate(timestamp: string | number, format = DATE.FULL_DATE_TIME) {
    return dayjs(timestamp).format(format)
  },
  ...url,
  ...index,
}
